	<!-- 当前所在位置 START -->
	{include file="_url.here.tpl"}
	<!-- 当前所在位置 END -->

	<!-- 主体区 -->
	<div class="area">

		<!-- 主体左边区 START -->
		<div class="aleft">
			
			<!-- 左边导航栏 START -->
			{include file='./user/_user.nav.tpl'}
			<!-- 左边导航栏 END -->
			
		</div>
		<!-- 主体左边区 END -->

		<!-- 主体右边区 START -->
		<div class="aright">

			<form id="fm_password" action="./index.php?frm=user&mdl=password&do=edit" method="post" target="ajax">

				<!-- 登录密码 START -->
				<div class="sl_t_block bdcolor-olivine">
					<div class="tt">
						<h2 class="color-olivine">登录密码</h2>
					</div>
					<div class="main-block pattern_line_right key-item">
						<dl><dt>用户名：</dt><dd>{$_userinfo.username}</dd><div class="clear"></div></dl>
						<dl><dt>原登录密码：</dt><dd><td><input type="password" name="oldpassword" value="" class="input" /></td></dd><div class="clear"></div></dl>
						<dl><dt>新登录密码：</dt><dd><td><input type="password" name="newpassword" value="" class="input" /></td></dd><div class="clear"></div></dl>
						<dl><dt>确认新密码：</dt><dd><td><input type="password" name="newpassword_confirm" value="" class="input" /></td></dd><div class="clear"></div></dl>
						<dl><dt>验证码：</dt><dd><input type="text" name="checkcode" id="checkcode" maxlength="4" class="input" style="width:80px;" /></dd><dd><img src="{$_s.app_dir}_checkcode.php" name="ckimg" border="0" id="ckimg" alt="点击可更换另一张" style="cursor:pointer;" /></dd><dd><a id="ckchange" href="#">换一张</a></dd><div class="clear"></div></dl>
						
					</div>
				</div>
				<!-- 登录密码 END -->

				<div class="space20"></div>

				<div class="tcenter">
					<input type="submit" name="formAction" value="提交" class="btn-main" />
				</div>

			</form>
		</div>
		<!-- 主体右边区 END -->

	</div>


	<script type="text/javascript" language="JavaScript" charset="utf-8">
	<!-- 
		{literal}
		jQuery(function($){
			$('#ckchange').click(function(){
				$('#ckimg').attr('src', _s.app_dir+'_checkcode.php?' + ((new Date()).getTime()));
			});
			$('#ckimg').click(function(){
				$(this).attr('src', _s.app_dir+'_checkcode.php?' + ((new Date()).getTime()));
			});

			$('#fm_password').submit(function(evt){
				var oldpassword	= $.trim($(this).find('input[name="oldpassword"]').val());
				var newpassword	= $.trim($(this).find('input[name="newpassword"]').val());
				var newpassword_confirm			= parseInt($(this).find('input[name="newpassword_confirm"]').val());
				var checkcode		= $.trim($(this).find('input[name="checkcode"]').val());

				var errmsg = [];
				if(oldpassword == '' || oldpassword.length < 6)errmsg.push('未输入原密码或少于6个字');
				if(newpassword == '' || newpassword.length < 6)errmsg.push('未输入新密码或少于6个字');
				if(newpassword != newpassword_confirm)errmsg.push('两次输入的密码不一致');
				if(checkcode == '' || checkcode.length != 4)errmsg.push('未输入验证码或格式不正确');

				if(errmsg.length > 0){
					evt.iscancelled = true;	// 阻止其他事件
					errmsg = errmsg.join('<br />');
					showmsg_warning(errmsg, {title:'表单验证失败'});
					return false;
				}
				return true;
			});
		});

		function callback_password_save(params){
			params.msg = params.msg || '密码信息保存成功';
			if(params.result == 'succ'){
				params['onClosed'] = function(){
					setTimeout(function(){
						showmsg_info('请重新登录！！！', {
							timeout	: 2000
							,onClosed	: function(){
								$('iframe#ajax').attr('src', '/index.php?mdl=user&do=logout');
							}
						});
					}, 100);
				}
			}
			callback_common(params);
		}
		{/literal}
	//-->
	</script>